[Top] [Prev] [Next] [Bottom] [Contents]

Sapphire/Web Projects


3

Overview

A Sapphire/Web-generated project consists of at least a project file, two or more HTML files, a main C/C++ file, a make file, and one or more HTML-related C/C++ module files. As you add HTML files with the document manager, they become part of your project. These HTML files can be used as either HTML templates, HTML activators, or both.

If a Form or Anchor in an HTML file has been bound as an Activator in a project, then an HTML-related C/C++ module will be created and added to the project. This file contains a Function for each bound activator in the HTML file, and one Registration Function name for the module containing Registration Calls for the activators in that HTML file. It also contains any registration calls for Aliases to those Activators.

The C/C++ module also contains your globals and includes code section, where other functions can be declared or defined.

The name of the C/C++ module is derived from the name of the HTML file. Therefore, several issues must be considered:

For example, a project, mark.pj, and an HTML file, mark.html, will produce the same main and module names. If you are looking to port to another O/S which has an 8.3 naming limit, then your HTML files will need to be named accordingly.
Note It is suggested that you name all your HTML files with a standard extension, for example, ".html" or ".htm". This will make it easier to manage, find, and query them in your file system. Limit the characters in the name to alphanumeric characters and the underscore.

Creating Projects

The Client Libraries

The client library for a Sapphire/Web Server Application is libwebdb.a. If you choose the non-gateway version (see sachmake.sh) you will use libwebdbSY.a, libwebdbOR.a, or libwebdbIF.a, depending on which database vendor you use. These vendor-specific client libraries depend on the database vendor's library. These client libraries do not have any dependency on X or Motif (this keeps the CGI efficient). The API and the client libraries can be used to build stand-alone, command-line driven executables.

The Makefile templates

In the config directory of the Sapphire/Web distribution is a file Makefile.tem. This file is used to generate the Server Application's makefile whenever you save your project. You can choose three modes of compilation: KR-C, ANSI C, and C++. Each has its own compile and link flags and options. You should make the appropriate changes for your developers during the tool setup, if needed. The Sapphire/Web client libraries are compiled with C linkage with the appropriate declarations for C or C++ in the headers.

The Shell scripts

During the operation of Sapphire/Web, a variety of shell scripts are called. This is your opportunity to customize the tool. You can add source code control, change the HTML browser, or editor by changing these scripts. See Chapter 7, "Project Options", for the various shell scripts.



[Top] [Prev] [Next] [Bottom] [Contents]

info@bluestone.com
Copyright © 1997, Bluestone. All rights reserved.